import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { ItemWrapper } from "@/components/room-item/style";
import { Rate } from 'antd';
const SectionItem = memo((props) => {
    const { item, itemWidth } = props
    return (
        <ItemWrapper veverifyColor={item.verify_info.text_color} itemWidth={itemWidth}>
            <div className='inner'>
                <div className='cove'>
                    <img src={item.picture_url} alt="" />
                </div>
                <div className='desc'>
                    {item.verify_info.messages.join('·')}
                </div>
                <div className='name'>
                    {item.name}
                </div>
                <div className='price'>
                    ¥{item.price}/晚
                </div>
                <span className='bottom'>
                    <Rate allowHalf defaultValue={item.star_rating} />;
                </span>
                <span className='extra'>
                    {item?.bottom_info?.content}
                </span>
            </div>
        </ItemWrapper>
    )
})

SectionItem.propTypes = {
    item: PropTypes.object,
    itemWidth: PropTypes.string
}

export default SectionItem